<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * 从数据库中自动载入数据配置
 * 表名: sys_configs
 * $dana['config_key'] = config_value
 * 
 */

function auto_config(){
	$CI =& get_instance();
	$CI->load->database();
	$results = $CI->db->query('sys_configs');
	while(list(,$row) = each($results->result_array())){
		if(!defined($row['config_key'])){
			defined($row['config_key'], $row['config_value']);
		}else{
			log_message('debugger', $row['config_key'].'已定义!');
		}
	}
}

/* End of file file_helper.php */
/* Location: ./system/helpers/file_helper.php */
